package com.hope.bubble.controller;

import com.hope.bubble.common.api.ApiResult;
import com.hope.bubble.model.entity.BubbleTip;
import com.hope.bubble.service.IBubbleTipService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 文件名：BubbleTipController
 * 创建者：hope
 * 邮箱：1602774287@qq.com
 * 微信：hope4cc
 * 创建时间：2022/10/21-17:31
 * 描述：每日一句
 */
@RestController
@RequestMapping("/tip")
public class BubbleTipController extends BaseController {

    @Resource
    private IBubbleTipService bubbleTipService;

    @GetMapping("/today")
    public ApiResult<BubbleTip> getRandomTip() {
        BubbleTip tip = bubbleTipService.getRandomTip();
        return ApiResult.success(tip);
    }
}
